package com.king.springcloud.controller;

import com.king.springcloud.domain.CommonResult;
import com.king.springcloud.domain.Order;
import com.king.springcloud.service.OrderService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author king
 * @date 2020/10/20 23:17
 */
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @RequestMapping("/order/create")
    public CommonResult create(@RequestBody Order order){
        orderService.create(order);
        return new CommonResult(200, "创建订单成功");
    }
}
